/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.msk.sys.service;


import com.msk.sys.domain.SysParam;
import com.msk.sys.mapper.SysParamDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * 系统参数设置Service
 * @author wlxiang
 * @version 2020-02-24
 */
@Service
@Transactional(readOnly = true)
public class SysParamService extends CrudService<SysParamDao, SysParam> {
    @Transactional(readOnly = false)
    public void updateRegistrationAgreement(SysParam sysParam) {
        dao.updateRegistrationAgreement(sysParam);
        // 数据缓存
//        CacheUtils.remove(SysParamUtils.CACHE_SYSPARAM_ALL_MAP);
    }

    @Transactional(readOnly = false)
    public void updateAboutUs(SysParam sysParam) {
        dao.updateAboutUs(sysParam);
        // 数据缓存
//        CacheUtils.remove(SysParamUtils.CACHE_SYSPARAM_ALL_MAP);
    }

    @Transactional(readOnly = false)
    public void save(SysParam sysParam) {
        super.save(sysParam);
        // 数据缓存
//        CacheUtils.remove(SysParamUtils.CACHE_SYSPARAM_ALL_MAP);
    }

    /**
     * 描述: 关于我们&注册协议
     * @author yangjy
     * @date 2023/7/14 9:51
     * @param
     * @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
     */
    public List<Map<String, Object>> aboutUsAndRegistration() {
        return dao.aboutUsAndRegistration();
    }
}
